#include<stdio.h>

#define N 10

int compare_str2(char arr1[], char arr2[]);
int compare_str(char arr1[], char arr2[]);
int main(int argc, char *argv[])
{	
	char arr1[N];
	char arr2[N];
	char c;

	for(int i = 0; i < N; i++){
		scanf("%c", &arr1[i]);
	}
	do{
		scanf("%c", c);
	}while(c!='\n');
	for(int i = 0; i < N; i++){
		scanf("%c", &arr2[i]);
	}

	puts(arr1);
	puts(arr2);

	
	return 0;
}

int compare_str2(char arr1[], char arr2[]){
	int i = 0;

	while(arr1[i] == arr2[i] && arr1[i]){// meiyou bijiao daxiao	
		i++;
	}
	return arr1[i] - arr2[i];
}

int compare_str(char arr1[], char arr2[]){
	int len1 = strlen(arr1);
	int len2 = strlen(arr2);
	int i;

	for(i = 0; i < len1 && i < len2; i++){
		if(arr1[i] > arr2[i]){
			return 1;
		}else if(arr1[i] < arr2[i]){
			return -1;
		}
	}
	if(i > len1 && i > len2){
		return 0;
	}else if(i > len1){
		return -1;
	}else if(i > len2){
		return 1;
	}

}

